package com.legendframework.core.initialization.entity;

import com.legendframework.core.dao.annotation.Column;
import com.legendframework.core.dao.annotation.Entity;
import com.legendframework.core.dao.entity.AbstractEntity;
import com.legendframework.core.dao.enums.DataType;
import com.legendframework.core.dao.yaml.enums.YamlStorageType;

/**
 * 数据源存储类型的配置文件
 *
 * @author : 196
 */
@Entity(type = DataType.YAML,yamlFileName = "dataStorage",yamlStorageType = YamlStorageType.ONE_TO_ONE)
public class DataStorage extends AbstractEntity {

    /**
     * 数据类型
     */
    @Column(comments = "数据类型",sort = 2)
    private DataType dataType;

    /**
     * Mysql 主机
     */
    @Column(comments = "Mysql主机地址",sort = 3)
    private String sqlHost;

    /**
     * Mysql 端口
     */
    @Column(comments = "Mysql端口",sort = 4)
    private String sqlPort;

    /**
     * Mysql 数据库名
     */
    @Column(comments = "Mysql数据库名",sort = 5)
    private String databaseName;

    /**
     * 用户名
     */
    @Column(comments = "Mysql用户名",sort = 6)
    private String username;

    /**
     * 密码
     */
    @Column(comments = "Mysql密码",sort = 7)
    private String password;

    public DataType getDataType() {
        return dataType;
    }

    public void setDataType(DataType dataType) {
        this.dataType = dataType;
    }

    public String getSqlHost() {
        return sqlHost;
    }

    public void setSqlHost(String sqlHost) {
        this.sqlHost = sqlHost;
    }

    public String getSqlPort() {
        return sqlPort;
    }

    public void setSqlPort(String sqlPort) {
        this.sqlPort = sqlPort;
    }

    public String getDatabaseName() {
        return databaseName;
    }

    public void setDatabaseName(String databaseName) {
        this.databaseName = databaseName;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
